import fetch from "./request.js";

// 新增农科讲堂课程
export function addKnowledgeCourse(data) {
  return fetch("/nb-pc/1.0.1/KnowledgeCourseService/addKnowledgeCourse", {
    method: "post",
    data: data,
    withLoading: true
  });
}
// 更新农科讲堂
export function updateKnowledgeCourse(data) {
  return fetch("/nb-pc/1.0.1/KnowledgeCourseService/updateKnowledgeCourse", {
    method: "post",
    data: data,
    withLoading: true
  });
}
// 删除农科讲堂课程
export function deleteKnowledgeCourse(data) {
  return fetch("/nb-pc/1.0.1/KnowledgeCourseService/deleteKnowledgeCourse", {
    method: "post",
    data: data,
    withLoading: true
  });
}
// 查看农科讲堂课程详情
export function detailKnowledgeCourse(data) {
  return fetch("/nb-pc/1.0.1/KnowledgeCourseService/detailKnowledgeCourse", {
    method: "post",
    data: data,
    headers:{
      "Content-Type":"application/json; charset=utf-8"
    },
    withLoading: true,
  });
}
// 分页查询农科讲堂课程
export function queryKnowledgeCourseList(data) {
  return fetch("/nb-pc/1.0.1/KnowledgeCourseService/queryKnowledgeCourseList", {
    method: "post",
    data: data,
  });
}

// 发布农科讲堂课程
export function publishKnowledgeCourse(data) {
  return fetch("/nb-pc/1.0.1/KnowledgeCourseService/publishKnowledgeCourse", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 取消发布农科讲堂课程
export function unPublishKnowledgeCourse(data) {
  return fetch("/nb-pc/1.0.1/KnowledgeCourseService/unPublishKnowledgeCourse", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 推荐农科讲堂课程
export function recommendKnowledgeCourse(data) {
  return fetch("/nb-pc/1.0.1/KnowledgeCourseService/recommendKnowledgeCourse", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 取消推荐农科讲堂课程
export function unRecommendKnowledgeCourse(data) {
  return fetch("/nb-pc/1.0.1/KnowledgeCourseService/unRecommendKnowledgeCourse", {
    method: "post",
    data: data,
    withLoading: true,
  });
}

// ----------------------------------------
// 分页查询知识专家
export function pageKnowledgeExpert(data) {
  return fetch("/nb-pc/1.0.1/KnowledgeExpertService/pageKnowledgeExpert", {
    method: "post",
    data: data,
  });
}
// 新增知识专家
export function addKnowledgeExpert(data) {
  return fetch("/nb-pc/1.0.1/KnowledgeExpertService/addKnowledgeExpert", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 修改知识专家
export function updateKnowledgeExpert(data) {
  return fetch("/nb-pc/1.0.1/KnowledgeExpertService/updateKnowledgeExpert", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// (批量)删除知识专家
export function deleteKnowledgeExpert(data) {
  return fetch("/nb-pc/1.0.1/KnowledgeExpertService/deleteKnowledgeExpert", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// (批量)发布知识专家
export function publishKnowledgeExpert(data) {
  return fetch("/nb-pc/1.0.1/KnowledgeExpertService/publishKnowledgeExpert", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// (批量)取消发布知识专家
export function unPublishKnowledgeExpert(data) {
  return fetch("/nb-pc/1.0.1/KnowledgeExpertService/unPublishKnowledgeExpert", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 推荐知识专家
export function recommendKnowledgeExpert(data) {
  return fetch("/nb-pc/1.0.1/KnowledgeExpertService/recommendKnowledgeExpert", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 取消推荐知识专家
export function unrecommendKnowledgeExpert(data) {
  return fetch("/nb-pc/1.0.1/KnowledgeExpertService/unrecommendKnowledgeExpert", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
